package com.physics.mps.entity.dto;

import com.baomidou.mybatisplus.annotation.*;
import com.physics.mps.entity.annotation.UpdateGroup;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 *
 * </p>
 *
 * @author mcsoft
 * @since 2023-09-11
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("t_app_param_group")
public class AppParamGroupEntity implements Serializable {

    private static final long serialVersionUID = -7202585202532844743L;

    @TableId(value = "id", type = IdType.ASSIGN_UUID)
    @NotNull(message = "id不能为空", groups = {UpdateGroup.class})
    private String id;

    @TableField("app_id")
    @NotBlank(message = "appId不能为空")
    private String appId;

    @TableField("module_id")
    @NotBlank(message = "moduleId不能为空")
    private String moduleId;

    @TableField("group_name")
    @NotBlank(message = "groupName不能为空")
    private String groupName;

    @TableField("group_key")
    @NotBlank(message = "groupKey不能为空")
    private String groupKey;

    @TableField("type")
    @NotBlank(message = "type不能为空")
    private String type;

    @TableField("order_by")
    private int orderBy;

    @TableField(value = "create_by", fill = FieldFill.INSERT)
    private String createBy;

    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @TableField(value = "update_by", fill = FieldFill.UPDATE)
    private String updateBy;

    @TableField(value = "update_time", fill = FieldFill.UPDATE)
    private LocalDateTime updateTime;


}
